www.gusucode.com > 良精ASP微博管理系统 V1.0 > 良精ASP微博管理系统 V1.0\code\admin\msg_edit.asp

    <!--#include file="../Include/CheckLogin.asp"-->
<!--#include file="../Include/liangconn.asp"-->
<!--#include file="../Include/Function.asp"-->
<%
	Msg_ID = Request("Msg_ID")
	if Msg_ID = "" then
		Call MsgBox2("参数不足!",0,"javascript:history.back();")
		Response.end
	end if
	
	Set Rs = Server.CreateObject("Adodb.recordset")
	
	action = Request("action")
	if action = "editArticle" then
		Sql = "Select * from Liangjing_Message where Msg_ID="&Msg_ID
		Rs.open Sql,conn,1,2
			Rs("Msg_Title") 	= Request("Msg_Title")
			Rs("Msg_Content") 	= Request("Msg_Content")
			Rs("Msg_Source") 	= Request("Msg_Source")
			Rs("Msg_orderby") 	= Request("Msg_orderby")
			Rs("Msg_IsOver") 	= Request("Msg_IsOver")
			Rs("Msg_ModifyTime")= Now()
		Rs.Update
		Rs.Close
		Set Rs = Nothing
		if err.Number = 0 then
			Call woDig.MsgBox2("编辑成功!",1,"Msg_Manage.asp")
			Response.end
		else
			Call woDig.MsgBox2("文章修改失败,原因:"&Err.Description,0,"javascript:history.back();")
			Response.end	
		end if
	end if
	
	Sql = "Select * from Liangjing_Message where Msg_ID="&Msg_ID
	Rs.open Sql,conn
	if Rs.eof then
		Call woDig.MsgBox2("找不到该记录或该记录已经被删除!",1,"Msg_Add.asp")
	end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>信 息 修 改</title>
<link href="images/Admin.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
// 信息表单提交客户端检测
function doSubmit(){
		if (document.form.Msg_title.value==""){
			alert("请输入标题!");
			document.form.Msg_title.focus();
			return false;
		}		
		if (document.form.Msg_Content.value==""){
			alert("请选择信息类型!");
			document.form.Msg_Content.focus();
			return false;
		}
		if (confirm("你确认真检查了您所要发布的文章了吗?")){
			return true;
		}
		return false;
	}
</script>
</head>
<body leftmargin="0" topmargin="8">
<form action="Msg_Edit.asp" method="POST" name="form" id="form" onsubmit="return doSubmit()">
  <table width="99%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
    <tr valign="middle" bgcolor="#EAEAEA"> 
      <td height="25" colspan="4" align="center">编辑消息</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="33" colspan="2" align="left" valign="middle">&nbsp;&nbsp;消息标题: 
	  </td>
	  <td colspan="2">
        <textarea name="Msg_title" cols="80"><%=Rs("Msg_Title")%></textarea> 
        <font color="#FF0000">         
      </font></td>
    </tr>

    <tr bgcolor="#FFFFFF"> 
      <td colspan="2" align="left" valign="middle">
        &nbsp;&nbsp;消息内容:
		</td>
	 <td colspan="2">
<textarea name='Msg_Content' cols='50' rows='6' class='input' style='display:none'><%=Rs("Msg_Content")%></textarea>
<iframe id='Message___Frame' src='../editor/fckeditor.html?InstanceName=Msg_Content&amp;Toolbar=Liangjing' width='620' height='300' frameborder='no'scrolling='no'>
</iframe>
      </td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="33" colspan="4" valign="middle">&nbsp;消息来源: 
        <input type="text" name="Msg_source" size="30" class="smallinput" maxlength="100" id="来源" value="<%=Rs("Msg_Source")%>">
        &nbsp;&nbsp;排序:
<input type="text" name="Msg_orderby" size="7" value="<%=Rs("Msg_OrderBy")%>">
&nbsp;&nbsp;是否过期:
<input type="radio" name="Msg_IsOver" value="1" <%if Rs("Msg_IsOver")=true then Response.Write(" Checked")%>>是
<input type="radio" name="Msg_IsOver" value="0" <%if Rs("Msg_IsOver")=false then Response.Write(" Checked")%>>否</td>
    </tr>
    <tr bgcolor="#EAEAEA"> 
      <td height="23" colspan="4" align="center"> 
		  <input name="cmdok" type="submit" class="buttonface" value=" 修 改 "> 
			&nbsp; 
		  <input type="reset" value=" 清 除 " name="cmdcancel" class="buttonface">
		  <input type="hidden" name="action" value="editArticle"> 
		  <input type="hidden" name="Msg_ID" value="<%=Msg_ID%>"> 
	  </td>
    </tr>
  </table>
</form>
  
</body>
</html>